           package com.java.diagnostics.visualizer.impl.axes;
           
           public class NumberFormatter
           {
             private static final double ROUNDING_THRESHOLD = 100.0D;
             private static final double SECOND_ROUNDING_THRESHOLD = 10.0D;
           
             public static String prettyString(double num)
             {
               String answer;
               //String answer;
               if (num < 10.0D) {
                 double roundedNum = Math.round(num * 100.0D) / 
                   100.0D;
                 answer = String.valueOf(roundedNum);
               }
               else
               {
                // String answer;
                 if (num < 100.0D) {
                   double roundedNum = Math.round(num * 10.0D) / 
                     10.0D;
                   answer = String.valueOf(roundedNum);
                 } else {
                   answer = String.valueOf(Math.round(num));
                 }
               }
               return answer;
             }
           }

